package com.nidu.demo.dept.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nidu.demo.dept.mapper.dataobject.DepartmentDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 部门Mapper接口
 *
 * @author auto
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<DepartmentDO> {

    @Select("SELECT * FROM sys_department WHERE code = #{code} AND company_id = #{companyId} LIMIT 1")
    DepartmentDO selectByCodeAndCompanyId(String code, Long companyId);

}